--2012-11-1
--版本更新表新增非一级页面标题背景
ALTER TABLE APP_UPDATE_TAB ADD(INT_APP_SECOND_TITLE_IMG_ID NUMBER(32) DEFAULT 0);
COMMENT ON COLUMN APP_UPDATE_TAB.INT_APP_SECOND_TITLE_IMG_ID IS '应用非一级页面标题背景ID';

--2012-11-16
--排序功能 start
ALTER TABLE APP_VIEW_CATELOG_RALATION_TAB ADD(INT_SORT_ORDER NUMBER(32) DEFAULT 0);
COMMENT ON COLUMN APP_VIEW_CATELOG_RALATION_TAB.INT_SORT_ORDER IS '排序顺序';

ALTER TABLE APP_VIEW_CONTENT_RALATION_TAB ADD(INT_SORT_ORDER NUMBER(32) DEFAULT 0);
COMMENT ON COLUMN APP_VIEW_CONTENT_RALATION_TAB.INT_SORT_ORDER IS '排序顺序';

ALTER TABLE CONTENT_TAB ADD(INT_SORT_ORDER NUMBER(32) DEFAULT 0);
COMMENT ON COLUMN CONTENT_TAB.INT_SORT_ORDER IS '置顶顺序';

  CREATE TABLE "SORT_COLUMNS_TAB" 
   (	"INT_SORT_COLUMN_ID" NUMBER(32,0), 
	"VAR_SORT_TABLE_NAME" VARCHAR2(100 CHAR), 
	"VAR_SORT_COLUMN_NAME" VARCHAR2(100 CHAR), 
	"VAR_COLUMN_DISPLAY_NAME" VARCHAR2(100 CHAR), 
	"INT_DELETE_SIGN" NUMBER(1,0) DEFAULT 0, 
	"INT_APP_ID" NUMBER(32,0) DEFAULT 0
   ) ;

   COMMENT ON COLUMN "SORT_COLUMNS_TAB"."INT_SORT_COLUMN_ID" IS 'ID';
   COMMENT ON COLUMN "SORT_COLUMNS_TAB"."VAR_SORT_TABLE_NAME" IS '表名';
   COMMENT ON COLUMN "SORT_COLUMNS_TAB"."VAR_SORT_COLUMN_NAME" IS '列名';
   COMMENT ON COLUMN "SORT_COLUMNS_TAB"."VAR_COLUMN_DISPLAY_NAME" IS '列名显示名称';
   COMMENT ON COLUMN "SORT_COLUMNS_TAB"."INT_DELETE_SIGN" IS '删除标识';
   COMMENT ON COLUMN "SORT_COLUMNS_TAB"."INT_APP_ID" IS '应用ID';

  CREATE TABLE "DATA_SORT_TAB" 
   (	"INT_SORT_ID" NUMBER(32,0), 
	"INT_VIEW_ID" NUMBER(32,0), 
	"INT_SORT_COLUMN_ID" NUMBER(32,0) DEFAULT 0, 
	"INT_SORT_RULE" NUMBER(1,0) DEFAULT 0, 
	"INT_IS_ATTR" NUMBER(1,0) DEFAULT 0, 
	"INT_DELETE_SIGN" NUMBER(1,0) DEFAULT 0, 
	"INT_IS_SHOW_IN_CLIENT" NUMBER(1,0) DEFAULT 0, 
	"INT_COLUMN_ORDER" NUMBER(2,0) DEFAULT 0
   ) ;

   COMMENT ON COLUMN "DATA_SORT_TAB"."INT_SORT_ID" IS 'ID';
   COMMENT ON COLUMN "DATA_SORT_TAB"."INT_VIEW_ID" IS '视图ID';
   COMMENT ON COLUMN "DATA_SORT_TAB"."INT_SORT_COLUMN_ID" IS '排序列名ID或属性ID(INT_IS_ATTR为1时)';
   COMMENT ON COLUMN "DATA_SORT_TAB"."INT_SORT_RULE" IS '排序规则:0升序，1降序';
   COMMENT ON COLUMN "DATA_SORT_TAB"."INT_IS_ATTR" IS '是否为扩展属性:0不是，1是';
   COMMENT ON COLUMN "DATA_SORT_TAB"."INT_DELETE_SIGN" IS '逻辑删除标识';
   COMMENT ON COLUMN "DATA_SORT_TAB"."INT_IS_SHOW_IN_CLIENT" IS '是否在客户端显示0不是，1是';
   COMMENT ON COLUMN "DATA_SORT_TAB"."INT_COLUMN_ORDER" IS '字段排序顺序';
   
   Insert into SORT_COLUMNS_TAB (INT_SORT_COLUMN_ID,VAR_SORT_TABLE_NAME,VAR_SORT_COLUMN_NAME,VAR_COLUMN_DISPLAY_NAME,INT_DELETE_SIGN,INT_APP_ID) values (1,'CONTENT_TAB','DAT_ADD_DATETIME','内容添加时间',0,0);
   Insert into SORT_COLUMNS_TAB (INT_SORT_COLUMN_ID,VAR_SORT_TABLE_NAME,VAR_SORT_COLUMN_NAME,VAR_COLUMN_DISPLAY_NAME,INT_DELETE_SIGN,INT_APP_ID) values (2,'CONTENT_TAB','DAT_UPDATE_DATETIME','内容更新时间',0,0);

   CREATE UNIQUE INDEX "SORT_COLUMNS_TAB_PK" ON "SORT_COLUMNS_TAB" ("INT_SORT_COLUMN_ID");
   CREATE UNIQUE INDEX "DATA_SORT_TAB_PK" ON "DATA_SORT_TAB" ("INT_SORT_ID");

  ALTER TABLE "SORT_COLUMNS_TAB" ADD CONSTRAINT "SORT_COLUMNS_TAB_PK" PRIMARY KEY ("INT_SORT_COLUMN_ID") ENABLE;
  ALTER TABLE "SORT_COLUMNS_TAB" MODIFY ("INT_SORT_COLUMN_ID" NOT NULL ENABLE);
  ALTER TABLE "DATA_SORT_TAB" ADD CONSTRAINT "DATA_SORT_TAB_PK" PRIMARY KEY ("INT_SORT_ID") ENABLE;
  ALTER TABLE "DATA_SORT_TAB" MODIFY ("INT_SORT_ID" NOT NULL ENABLE);
  ALTER TABLE "DATA_SORT_TAB" MODIFY ("INT_VIEW_ID" NOT NULL ENABLE);
CREATE SEQUENCE SORT_COLUMNS_TAB_SEQ MINVALUE 1 MAXVALUE 999999999 INCREMENT BY 1 START WITH 1 NOCACHE NOORDER  NOCYCLE ;
CREATE SEQUENCE DATA_SORT_TAB_SEQ MINVALUE 1 MAXVALUE 999999999 INCREMENT BY 1 START WITH 1 NOCACHE NOORDER  NOCYCLE ;
--排序功能 end

--IOS证书上传 start
ALTER TABLE APP_TAB ADD(VAR_APPSTORE_CER_URL VARCHAR2(200 CHAR));
COMMENT ON COLUMN "APP_TAB"."VAR_APPSTORE_CER_URL" IS 'appstore IOS证书文件';
ALTER TABLE APP_TAB ADD(VAR_GOTOAPP_CER_URL VARCHAR2(200 CHAR));
COMMENT ON COLUMN "APP_TAB"."VAR_GOTOAPP_CER_URL" IS 'gotoapp IOS证书文件';
--IOS证书上传 end

--2012-12-25
--后台功能调整 start
INSERT INTO "WEB_MENU_TAB" VALUES (1, 0, '客户端信息管理', NULL, NULL, 0, NULL);
UPDATE WEB_MENU_TAB SET INT_PARENT_MENU_ID=2 WHERE INT_MENU_ID=112;
INSERT INTO "WEB_MENU_TAB" VALUES (2, 0, '客户端功能管理', NULL, 'mainFrame', 0, NULL);
INSERT INTO "WEB_MENU_TAB" VALUES (115, 2, '位置导航', NULL, 'mainFrame', 0, NULL);
INSERT INTO "WEB_MENU_TAB" VALUES (116, 2, '一键拨打', '/more/goInit.action?type=1', 'mainFrame', 0, NULL);
INSERT INTO "WEB_MENU_TAB" VALUES (117, 2, '外链地址', '/more/goInit.action?type=2', 'mainFrame', 0, NULL);
INSERT INTO "WEB_MENU_TAB" VALUES (118, 2, '客户端分享', '/more/goInit.action?type=5', 'mainFrame', 0, NULL);
INSERT INTO "WEB_MENU_TAB" VALUES (119, 2, 'APP背景音乐管理', NULL, 'mainFrame', 0, NULL);
INSERT INTO "WEB_MENU_TAB" VALUES (120, 2, 'LOADING页面管理', '/more/goViewLoading.action', 'mainFrame', 0, NULL);

INSERT INTO "APP_DETAIL_PAGE_MODULE_TAB" VALUES (9, '音频', 4, '/manage/images/detail/img_music.png', '/manage/page/contentDetailAudio.jsp', 0, NULL);
INSERT INTO "APP_DETAIL_PAGE_MODULE_TAB" VALUES (7, '视频', 4, '/manage/images/detail/img_video.png', '/manage/page/contentDetailVideo.jsp', 0, NULL);
--后台功能调整 end

--2013-1-15
--讲内容表的添加时间字段抽离成扩展属性
INSERT INTO "ATTRIBUTE_TAB" VALUES (4, 0, '添加时间', 0, '2012-09-13 09:31:24', 0, 0);

--2013-1-15
--会员管理系统 start
ALTER TABLE CATELOG_TAB ADD(INT_PRIVILEGE NUMBER(2) DEFAULT 0);
COMMENT ON COLUMN CATELOG_TAB.INT_PRIVILEGE IS '分类访问权限0:公共,1:会员,2:个人';
ALTER TABLE CONTENT_TAB ADD(INT_PRIVILEGE_USER NUMBER(32,0) DEFAULT 0);
COMMENT ON COLUMN CONTENT_TAB.INT_PRIVILEGE_USER IS '客户端用户ID';
--会员管理系统 end

--2013-2-22
--四川美食俱乐部搜索功能 start
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(26,'成都市成华区',1,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(27,'成都市武侯区',2,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(28,'成都市青羊区',3,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(29,'成都市锦江区',4,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(30,'成都市金牛区',5,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(31,'成都市龙泉驿区',6,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(32,'成都市青白江区',7,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(33,'成都市新都区',8,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(34,'成都市双流县',9,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(35,'成都市郫县',10,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(36,'成都市温江区',11,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(37,'成都市大邑县',12,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(38,'成都市金堂县',13,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(39,'成都市蒲江县',14,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(40,'成都市新津县',15,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(41,'成都市蒲江县',16,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(42,'成都市都江堰市',17,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(43,'成都市彭州市',18,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(44,'成都市崇州市',19,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(45,'成都市邛崃市',20,12,0,'2013-2-22 10:00:00');

INSERT INTO ATTRIBUTE_LIST_TAB VALUES(46,'眉山市东坡区',21,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(47,'眉山市洪雅县',22,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(48,'眉山市丹棱县',23,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(49,'眉山市青神县',24,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(50,'眉山市仁寿县',25,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(51,'眉山市彭山县',26,12,0,'2013-2-22 10:00:00');

INSERT INTO ATTRIBUTE_LIST_TAB VALUES(52,'乐山市中区',27,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(53,'乐山市五通桥区',28,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(54,'乐山市沙湾区',29,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(55,'乐山市金口河区',30,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(56,'乐山市犍为县',31,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(57,'乐山市井研县',32,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(58,'乐山市夹江县',33,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(59,'乐山市沐川县',34,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(60,'乐山市峨边彝族自治县',35,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(61,'乐山市马边彝族自治县',36,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(62,'峨眉山市',37,12,0,'2013-2-22 10:00:00');

INSERT INTO ATTRIBUTE_LIST_TAB VALUES(63,'自贡市自流井区',38,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(64,'自贡市贡井区',39,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(65,'自贡市大安区',40,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(66,'自贡市沿滩区和荣县',41,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(67,'自贡市富顺县',42,12,0,'2013-2-22 10:00:00');

INSERT INTO ATTRIBUTE_LIST_TAB VALUES(68,'资阳市雁江区',43,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(69,'资阳市简阳市',44,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(70,'资阳市安岳县',45,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(71,'资阳市乐至县',46,12,0,'2013-2-22 10:00:00');

INSERT INTO ATTRIBUTE_LIST_TAB VALUES(72,'南充市顺庆区',47,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(73,'南充市高坪区',48,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(74,'南充市嘉陵区',49,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(75,'南充市南部县',50,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(76,'南充市仪陇县',51,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(77,'南充市西充县',52,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(78,'南充市蓬安县',53,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(79,'南充市营山县',54,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(80,'阆中市',55,12,0,'2013-2-22 10:00:00');

INSERT INTO ATTRIBUTE_LIST_TAB VALUES(81,'内江市中区',56,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(82,'内江市东兴区',57,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(83,'内江市资中县',58,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(84,'内江市隆昌县',59,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(85,'内江市威远县',60,12,0,'2013-2-22 10:00:00');

INSERT INTO ATTRIBUTE_LIST_TAB VALUES(86,'遂宁市大英县',61,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(87,'遂宁市船山区',62,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(88,'遂宁市安居区',63,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(89,'遂宁市蓬溪县',64,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(90,'遂宁市大英县',65,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(91,'遂宁市射洪县',66,12,0,'2013-2-22 10:00:00');

INSERT INTO ATTRIBUTE_LIST_TAB VALUES(92,'雅安市雨城区',67,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(93,'雅安市芦山县',68,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(94,'雅安市名山县',69,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(95,'雅安市天全县',70,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(96,'雅安市荥经县',71,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(97,'雅安市宝兴县',72,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(98,'雅安市汉源县',73,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(99,'雅安市石棉县',74,12,0,'2013-2-22 10:00:00');

INSERT INTO ATTRIBUTE_LIST_TAB VALUES(100,'泸州市江阳区',75,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(101,'泸州市纳溪区',76,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(102,'泸州市龙马潭区',77,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(103,'泸州市泸县',78,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(104,'泸州市合江县',79,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(105,'泸州市叙永县',80,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(106,'泸州市古蔺县',81,12,0,'2013-2-22 10:00:00');

INSERT INTO ATTRIBUTE_LIST_TAB VALUES(107,'达州市通川区',82,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(108,'达州市达县',83,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(109,'达州市宣汉县',84,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(110,'达州市开江县',85,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(111,'达州市大竹县',86,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(112,'达州市渠县',87,12,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(113,'万源市',88,12,0,'2013-2-22 10:00:00');

INSERT INTO ATTRIBUTE_LIST_TAB VALUES(114,'自助餐',1,13,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(115,'蛋糕',2,13,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(116,'香锅烧烤',3,13,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(117,'西餐',4,13,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(118,'火锅',5,13,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(119,'地方菜',6,13,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(120,'日韩料理',7,13,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(121,'快餐休闲',8,13,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(122,'甜点饮品',9,13,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(123,'东南亚菜',10,13,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(124,'海鲜',11,13,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(125,'其他美食',12,13,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(126,'酒吧',13,13,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(127,'中餐',14,13,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(128,'干锅',15,13,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(129,'ktv',16,13,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(130,'茶楼',17,13,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(131,'咖啡馆',18,13,0,'2013-2-22 10:00:00');

INSERT INTO ATTRIBUTE_LIST_TAB VALUES(132,'0-50元',1,14,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(133,'51-100元',2,14,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(134,'101-150元',3,14,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(135,'151-200元',4,14,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(136,'200-250元',5,14,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(137,'250-300元',6,14,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(138,'300元以上',7,14,0,'2013-2-22 10:00:00');
--四川美食俱乐部搜索功能 end

--2013-2-26
--视图风格配置如高度 start
ALTER TABLE APP_PAGE_VIEW_TAB ADD(VAR_VIEW_CONFIG VARCHAR2(2000 CHAR) DEFAULT NULL);
COMMENT ON COLUMN APP_PAGE_VIEW_TAB.VAR_VIEW_CONFIG IS '视图配置,JSON格式';
--视图风格设置如高度 end

--2013-2-28
--修改门店电话号码长度 start
alter table enterp_shop_tab modify(var_shop_phonenum varchar2 (100 char));
--修改门店电话号码长度 end

--2013-3-19
--至坤旅行社搜索功能 start
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(139,'国内游',1,15,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(140,'出境游',2,15,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(141,'自由行',3,15,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(142,'自驾游',4,15,0,'2013-2-22 10:00:00');

INSERT INTO ATTRIBUTE_LIST_TAB VALUES(143,'苏州',1,16,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(144,'上海',2,16,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(145,'杭州',3,16,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(146,'南京',4,16,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(147,'无锡',5,16,0,'2013-2-22 10:00:00');

INSERT INTO ATTRIBUTE_LIST_TAB VALUES(148,'苏州',1,17,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(149,'无锡',5,17,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(150,'常州',2,17,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(151,'南京',3,17,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(152,'杭州',4,17,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(153,'宁波',1,17,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(154,'黄山',5,17,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(155,'青岛',2,17,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(156,'海口',3,17,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(157,'三亚',4,17,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(158,'昆明',4,17,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(159,'丽江',1,17,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(160,'大理',5,17,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(161,'厦门',2,17,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(162,'大连',3,17,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(163,'桂林',4,17,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(164,'阳塑',3,17,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(165,'张家界',4,17,0,'2013-2-22 10:00:00');

INSERT INTO ATTRIBUTE_LIST_TAB VALUES(166,'0-2000',1,18,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(167,'2000-5000',2,18,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(168,'5001-9999',3,18,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(169,'10000-20000',4,18,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(170,'20000以上',5,18,0,'2013-2-22 10:00:00');
--至坤旅行社搜索功能 end

--2013-3-20
--应用打包资源 start
alter table app_tab add(var_pack_resource varchar2 (4000 char) default null);
--应用打包资源 end

--2013-3-21
--添加功能事件类型 start
INSERT INTO "TYPE_TAB" VALUES (136, 16, 0, '登录', 11, 0, '2012-09-03 22:15:48');
INSERT INTO "TYPE_TAB" VALUES (137, 16, 0, '搜索', 12, 0, '2012-09-03 22:15:48');
INSERT INTO "TYPE_TAB" VALUES (138, 16, 0, '推送消息管理', 13, 0, '2012-09-03 22:15:48');
INSERT INTO "TYPE_TAB" VALUES (139, 16, 0, '圈子', 14, 0, '2012-09-03 22:15:48');
--添加功能事件类型 end
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(166,'0-2000',1,18,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(167,'2000-5000',2,18,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(168,'5001-9999',3,18,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(169,'10000-20000',4,18,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(170,'20000以上',5,18,0,'2013-2-22 10:00:00');
--2013-4-10
--安居顾问搜索 start
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(171,'青羊区',1,19,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(172,'锦江区',2,19,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(173,'金牛区',3,19,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(174,'武侯区',4,19,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(175,'成华区',5,19,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(176,'龙泉驿区',6,19,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(177,'青白江区',7,19,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(178,'新都区',8,19,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(179,'温江区',9,19,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(180,'崇州市',10,19,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(181,'邛崃市',11,19,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(182,'都江堰市',12,19,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(183,'彭州市',13,19,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(184,'金堂县',14,19,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(185,'双流县',15,19,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(186,'郫县',16,19,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(187,'大邑县',17,19,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(188,'蒲江县',18,19,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(189,'新津县',19,19,0,'2013-2-22 10:00:00');

INSERT INTO ATTRIBUTE_LIST_TAB VALUES(190,'3000内',1,20,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(191,'3000-6000',2,20,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(192,'6000-9000',3,20,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(193,'9000-12000',4,20,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(194,'12000-15000',5,20,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(195,'16000以上',6,20,0,'2013-2-22 10:00:00');

INSERT INTO ATTRIBUTE_LIST_TAB VALUES(196,'高层',1,21,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(197,'小高层',2,21,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(198,'多层',3,21,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(199,'别墅',4,21,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(200,'写字楼',5,21,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(201,'商铺',6,21,0,'2013-2-22 10:00:00');
INSERT INTO ATTRIBUTE_LIST_TAB VALUES(202,'综合体',7,21,0,'2013-2-22 10:00:00');
--安居顾问搜索 end

--2013-3-27
--会员信息绑定：修改更多表存放内容的长度 start
ALTER TABLE MORE_CONTENT_TAB MODIFY(VAR_MORE_CONTENT VARCHAR2(2000 CHAR));
--会员信息绑定：修改更多表存放内容的长度 end

--2013-3-28
--半坡 start
insert into system_cate_tab (INT_SYS_CATE_ID, INT_PARENT_SYS_CATE_ID, VAR_SYS_CATE_NAME, INT_DELETE_SIGN, DAT_UPDATE_DATETIME)
values (5, 0, '新版活动', 0, '2012-09-13 00:00:00');
insert into system_cate_tab (INT_SYS_CATE_ID, INT_PARENT_SYS_CATE_ID, VAR_SYS_CATE_NAME, INT_DELETE_SIGN, DAT_UPDATE_DATETIME)
values (6, 0, '品牌', 0, '2012-09-13 00:00:00');
insert into system_cate_tab (INT_SYS_CATE_ID, INT_PARENT_SYS_CATE_ID, VAR_SYS_CATE_NAME, INT_DELETE_SIGN, DAT_UPDATE_DATETIME)
values (7, 0, '外链产品', 0, '2012-09-13 00:00:00');
insert into system_cate_tab (INT_SYS_CATE_ID, INT_PARENT_SYS_CATE_ID, VAR_SYS_CATE_NAME, INT_DELETE_SIGN, DAT_UPDATE_DATETIME)
values (8, 0, '相册', 0, '2012-09-13 00:00:00');
INSERT INTO SYS_CATE_ATTRIBUTE_TAB VALUES(22,7,'价格',0,'2013-2-22 10:00:00');
INSERT INTO SYS_CATE_ATTRIBUTE_TAB VALUES(23,7,'外部链接',0,'2013-2-22 10:00:00');
--半坡 end
insert into system_cate_tab (INT_SYS_CATE_ID, INT_PARENT_SYS_CATE_ID, VAR_SYS_CATE_NAME, INT_DELETE_SIGN, DAT_UPDATE_DATETIME)
values (9, 0, '电商', 0, '2012-09-13 00:00:00');

--2013-5-11
--修改门店表 start
ALTER TABLE ENTERP_SHOP_TAB ADD(VAR_THUMB_IMG VARCHAR2(100 CHAR));
ALTER TABLE ENTERP_SHOP_TAB ADD(VAR_DESC CLOB);
ALTER TABLE ENTERP_SHOP_TAB ADD(VAR_OPEN_TIME VARCHAR2(20 CHAR));
ALTER TABLE ENTERP_SHOP_TAB ADD(VAR_BUSINESS_AREA VARCHAR2(2000 CHAR));
ALTER TABLE ENTERP_SHOP_TAB ADD(VAR_ICON_URL VARCHAR2(200 CHAR));
--修改门店表 end
INSERT INTO "TYPE_TAB" VALUES (140, 16, 0, '新版订单', 151, 0, '2012-09-03 22:15:48');

--2013-6-18
--自定义page start
ALTER TABLE APP_PAGE_TAB ADD(INT_TYPE NUMBER(2,0) DEFAULT 0);
COMMENT ON COLUMN APP_PAGE_TAB.INT_TYPE IS '页面类型，0:普通,1：自定义';
--自定义page end

--2013-7-7
--全文检索 start
--内容表全文索引
exec CTXSYS.ctx_ddl.create_preference('CONTENT_MULTICOL', 'MULTI_COLUMN_DATASTORE');
--指定多列索引
exec CTXSYS.ctx_ddl.SET_ATTRIBUTE('CONTENT_MULTICOL', 'COLUMNS', 'VAR_CONTENT_NAME, VAR_CONTENT_DESCRIPT');
--分词器
exec CTXSYS.ctx_ddl.create_preference('CONTENT_LEXER', 'CHINESE_LEXER');
create index idx_content_search_ctx on content_tab(VAR_CONTENT_NAME) indextype is CTXSYS.CONTEXT
PARAMETERS('DATASTORE CONTENT_MULTICOL LEXER CONTENT_LEXER');
--输入参数分词函数
exec CTX_DDL.CREATE_POLICY('CONTENT_POLICY',LEXER => 'CONTENT_LEXER');
create or replace function p_split_chinese(p_input in varchar2)
    return varchar2 as 
       v_tab CTX_DOC.TOKEN_TAB;
       v_return VARCHAR2(32767);
    begin
       CTX_DOC.POLICY_TOKENS('CONTENT_POLICY',p_input,v_tab);
       for i in 1..v_tab.count loop
          v_return := v_return || ',' || v_tab(i).token;
       end loop;
       return LTRIM(v_return,',');
     end;
/

--产品表全文索引
exec CTXSYS.ctx_ddl.create_preference('EC_PRODUCT_MULTICOL', 'MULTI_COLUMN_DATASTORE');
exec CTXSYS.ctx_ddl.SET_ATTRIBUTE('EC_PRODUCT_MULTICOL', 'COLUMNS', 'TITLE, SUMMARY,BODY');
exec CTXSYS.ctx_ddl.create_preference('EC_PRODUCT_LEXER', 'CHINESE_LEXER');
create index idx_product_search_ctx on ec_product(TITLE) indextype is CTXSYS.CONTEXT
PARAMETERS('DATASTORE EC_PRODUCT_MULTICOL LEXER EC_PRODUCT_LEXER');
--输入参数分词函数
exec CTX_DDL.CREATE_POLICY('PRODUCT_POLICY',LEXER => 'EC_PRODUCT_LEXER');
create or replace function p_split_chinese(p_input in varchar2)
    return varchar2 as 
       v_tab CTX_DOC.TOKEN_TAB;
       v_return VARCHAR2(32767);
    begin
       CTX_DOC.POLICY_TOKENS('PRODUCT_POLICY',p_input,v_tab);
       for i in 1..v_tab.count loop
          v_return := v_return || ',' || v_tab(i).token;
       end loop;
       return LTRIM(v_return,',');
     end;
/
--定期同步产品全文索引 5分钟一次
VARIABLE jobno_sysc number;
BEGIN
DBMS_JOB.SUBMIT(:jobno_sysc,'ctx_ddl.sync_index(''IDX_PRODUCT_SEARCH_CTX'');',
SYSDATE, 'sysdate + 1/288');
commit;
END;
--定期优化产品全文索引 1天一次
VARIABLE jobno_opt number;
BEGIN
DBMS_JOB.SUBMIT(:jobno_opt,'ctx_ddl.optimize_index(''IDX_PRODUCT_SEARCH_CTX'',''FULL'');',
to_date('13-07-2013 03:00:00', 'dd-mm-yyyy hh24:mi:ss'), 'SYSDATE + 1');
commit;
END;
--定期同步内容全文索引 5分钟一次
VARIABLE jobno_sysc number;
BEGIN
DBMS_JOB.SUBMIT(:jobno_sysc,'ctx_ddl.sync_index(''IDX_CONTENT_SEARCH_CTX'');',
SYSDATE, 'sysdate + 1/288');
commit;
END;
--定期优化内容全文索引 1天一次
VARIABLE jobno_opt number;
BEGIN
DBMS_JOB.SUBMIT(:jobno_opt,'ctx_ddl.optimize_index(''IDX_CONTENT_SEARCH_CTX'',''FULL'');',
to_date('13-07-2013 03:00:00', 'dd-mm-yyyy hh24:mi:ss'), 'SYSDATE + 1');
commit;
END;
--查询所有job
select * from dba_jobs；
--根据jobno删除job
begin
dbms_job.remove(29);
end;
--以sysdba的身份分配权限
alter user ctxsys account unlock;
grant execute on CTXSYS.CTX_DDL to PNS;
grant execute on CTXSYS.CTX_DDL to DEV_UN;

--全文检索 end

--定时任务 start
VARIABLE jobno_sysc number;
BEGIN
DBMS_JOB.SUBMIT(:jobno_sysc,'update content_tab set int_resource_id=0 where int_resource_id is null;update content_tab set int_privilege_user=0 where int_privilege_user is null;',
to_date('13-07-2013 03:00:00', 'dd-mm-yyyy hh24:mi:ss'), 'SYSDATE + 1');
commit;
END;
--定时任务 end

--2013-7-12
--内容表增加评论数、参加数、收藏数 start
ALTER TABLE CONTENT_TAB ADD(COMMENT_COUNT NUMBER(32,0) DEFAULT 0);
ALTER TABLE CONTENT_TAB ADD(FAV_COUNT NUMBER(32,0) DEFAULT 0);
ALTER TABLE CONTENT_TAB ADD(JOIN_COUNT NUMBER(32,0) DEFAULT 0);
--内容表增加评论数、参加数、收藏数 end
--内容表同步评论数、参加数、收藏数 start
grant select on PNS.USER_ACTIONS to DEV_UN;
create or replace 
procedure content_statistics(actiontype in varchar2) is
contentId number;
totalCount number;
begin
  declare cursor temp_data_cur is 
  select "PNS"."USER_ACTIONS".TARGET_ID-480000000000 as CONTENT_ID,count("PNS"."USER_ACTIONS".TARGET_ID) as TOTAL_COUNT 
  from "PNS"."USER_ACTIONS" 
  where "PNS"."USER_ACTIONS".TARGET_ID like '48%' 
  and "PNS"."USER_ACTIONS".ACTION_TYPE=actiontype 
  group by "PNS"."USER_ACTIONS".TARGET_ID;
  begin
    open temp_data_cur;
    loop
      fetch temp_data_cur into contentId,totalCount;
      exit when temp_data_cur%notfound;
      if actiontype='ACTIVITIES_FAV' then
        update content_tab set fav_count=totalCount where int_content_id=contentId;
        dbms_output.put_line(contentId || '***fav:' || totalCount);
      elsif actiontype='COMMENTS_ADD' then
        update content_tab set comment_count=totalCount where int_content_id=contentId;
        dbms_output.put_line(contentId || '***coms:' || totalCount);
      elsif actiontype='ACTIVITIES_JOIN' then
        update content_tab set join_count=totalCount where int_content_id=contentId;
        dbms_output.put_line(contentId || '***join:' || totalCount);
      else
        dbms_output.put_line('参数不对');
      end if;
    end loop;
    commit;
  end;
end;
--内容表同步评论数、参加数、收藏数 end

--2013-7-17
--门店 start
insert into system_cate_tab (INT_SYS_CATE_ID, INT_PARENT_SYS_CATE_ID, VAR_SYS_CATE_NAME, INT_DELETE_SIGN, DAT_UPDATE_DATETIME)
values (10, 0, '门店', 0, '2013-07-17 00:00:00');
--门店 end

--2013-7-22
--多图上传及排序 start
ALTER TABLE CONTENT_IMG_TAB ADD(INT_ORDER NUMBER(32,0) default null);
--多图上传及排序 end
--2013-7-25
--门店内容 start
ALTER TABLE ENTERP_SHOP_TAB ADD(INT_CATE_ID NUMBER(32,0) DEFAULT 0);
ALTER TABLE ENTERP_SHOP_TAB ADD(VAR_SHOP_AREA VARCHAR2(2000) DEFAULT null);
--门店内容 end

--新增系统分类时更新老用户增加新增分类
create or replace 
function produceNewFunOnOldAccount return varchar2
is
type ids is table of app_tab.int_app_id%type;
allIds ids;
var_system_date varchar2(100);
int_cate_id number(32);
int_enterp_id number(32);
begin
  select int_app_id bulk collect into allIds from ((select int_app_id from app_tab) minus (select distinct int_app_id from catelog_tab where int_type=8));
  select to_char(sysdate,'yyyy-MM-dd HH24:mm:ss') into var_system_date from dual;
  FOR i in allIds.first .. allIds.last
    loop
      select int_enterp_id into int_enterp_id from app_tab where int_app_id=allIds(i);
      insert into catelog_tab (INT_CATE_ID, VAR_CATE_NAME, INT_ENTERP_ID, INT_PARENT_CATE_ID, INT_APP_ID, VAR_CATE_IMG_URL, INT_DELETE_SIGN, DAT_UPDATE_DATETIME, INT_HAS_SUB_CATE, VAR_CATE_DESCRIP, INT_TYPE, INT_SOURCE_ID, INT_PRIVILEGE)
             values (catelog_tab_seq.nextval, '电商', int_enterp_id, 0, allIds(i), null, 0, var_system_date, 0,  '电商', 8, 0, 0);
      insert into catelog_tab (INT_CATE_ID, VAR_CATE_NAME, INT_ENTERP_ID, INT_PARENT_CATE_ID, INT_APP_ID, VAR_CATE_IMG_URL, INT_DELETE_SIGN, DAT_UPDATE_DATETIME, INT_HAS_SUB_CATE, VAR_CATE_DESCRIP, INT_TYPE, INT_SOURCE_ID, INT_PRIVILEGE)
             values (catelog_tab_seq.nextval, '新版活动', int_enterp_id, 0, allIds(i), null, 0, var_system_date, 0,  '新版活动', 4, 0, 0);
      insert into catelog_tab (INT_CATE_ID, VAR_CATE_NAME, INT_ENTERP_ID, INT_PARENT_CATE_ID, INT_APP_ID, VAR_CATE_IMG_URL, INT_DELETE_SIGN, DAT_UPDATE_DATETIME, INT_HAS_SUB_CATE, VAR_CATE_DESCRIP, INT_TYPE, INT_SOURCE_ID, INT_PRIVILEGE)
             values (catelog_tab_seq.nextval, '相册', int_enterp_id, 0, allIds(i), null, 0, var_system_date, 0,  '相册', 7, 0, 0);
      insert into catelog_tab (INT_CATE_ID, VAR_CATE_NAME, INT_ENTERP_ID, INT_PARENT_CATE_ID, INT_APP_ID, VAR_CATE_IMG_URL, INT_DELETE_SIGN, DAT_UPDATE_DATETIME, INT_HAS_SUB_CATE, VAR_CATE_DESCRIP, INT_TYPE, INT_SOURCE_ID, INT_PRIVILEGE)
             values (catelog_tab_seq.nextval, '品牌', int_enterp_id, 0, allIds(i), null, 0, var_system_date, 0,  '品牌', 5, 0, 0);

     select catelog_tab_seq.nextval into int_cate_id from dual;
     insert into catelog_tab (INT_CATE_ID, VAR_CATE_NAME, INT_ENTERP_ID, INT_PARENT_CATE_ID, INT_APP_ID, VAR_CATE_IMG_URL, INT_DELETE_SIGN, DAT_UPDATE_DATETIME, INT_HAS_SUB_CATE, VAR_CATE_DESCRIP, INT_TYPE, INT_SOURCE_ID, INT_PRIVILEGE)
             values (int_cate_id, '外链产品', int_enterp_id, 0, allIds(i), null, 0, var_system_date, 0,  '外链产品', 6, 0, 0);
      insert into attribute_tab (INT_ATTRI_ID, INT_CATE_ID, VAR_ATTRI_NAME, INT_DELETE_SIGN, DAT_UPDATE_DATETIME, INT_INPUT_TYPE, INT_TYPE)
             values (attribute_tab_seq.nextval, int_cate_id, '价格', 0, var_system_date, 0, 22);
      insert into attribute_tab (INT_ATTRI_ID, INT_CATE_ID, VAR_ATTRI_NAME, INT_DELETE_SIGN, DAT_UPDATE_DATETIME, INT_INPUT_TYPE, INT_TYPE)
             values (attribute_tab_seq.nextval, int_cate_id, '外部链接', 0, var_system_date, 0, 23);
      dbms_output.put_line(int_enterp_id);
    end loop;
    commit;
    RETURN NULL;
end;